

public class Attack {
	protected String name;
	private AttackName atkName;
	protected String description;
	protected String info;
	protected Type type;
	protected int energyCost;
	protected String attackAnimation;
	protected String attackReverseAnimation;
	protected int animationTime;
	protected String skill;
	Effect effects;

	public int animationTime(){
		return animationTime;
	}
	
	public String getName(){
		return name;
	}
	
	public String getDescription(){
		return description;
	}
	
	public Type getType(){
		return type;
	}
	
	public AttackName getAtkName() {
		return atkName;
	}
	
	public int getEnergyCost(){
		return energyCost;
	}
	
	public String getAnimation(){
		return attackAnimation;
	}
	public String getReverseAnimation(){
		return attackReverseAnimation;
	}
	/*      Damage ska bestï¿½mmas beroende pï¿½ strength, under fighten
	public int getDamage(){          
		return damage;
	}*/
	
	/*
	 * omdefiniering av equals-metoden fÃ¶r att kunna
	 * jÃ¤mfÃ¶ra fÃ¶remÃ¥l baserat pÃ¥ deras namn istÃ¤llet fÃ¶r
	 * instansreferens. (mostly copypasta.)
	 * Kopierad copypasta ;P
	 */
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		} else if (obj instanceof Attack) {
			Attack attack2 = (Attack) obj;
			if (this.getName() == attack2.getName()) {
				return true;
			}
			else {
				return false;
			}
		} else {
			return false;
		}
	}
	
	public int hashCode() {
		return this.getName().hashCode();
	}
	
	
	Attack(AttackName atkName){
		this.atkName = atkName;
		switch (atkName){
		
		
		//FIRE DAMAGE

		case Eldslag: {
			name = "Eldslag";
	   		description = "Måla om deras ansikten med blod och eld!";
	   		info = "Slår fienden med en handfull med eld. Liten skada.";
	   		type = Type.Fire;
	   		int damage = 30;
	   		energyCost = 30;
	   		animationTime =900;
	   		skill = "attack";
	   		attackAnimation="attackAnimations/eldslagsAnimation.gif";
	   		attackReverseAnimation="attackAnimations/eldslagsReverseAnimation.gif";
			effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
			break;
		}
		case Pungspark: {
			name = "Pungspark";
	   		description = "Du sparkade han rakt i familjejuvelerna!";
	   		info = "En spark i skrevet. Måttlig skada.";
			skill = "attack";
	   		type = Type.Fire;
	   		int damage = 84;
	   		energyCost = 70;
	   		animationTime = 950;
	   		attackAnimation="attackAnimations/pungsparkAnimation.gif";
	   		attackReverseAnimation="attackAnimations/pungsparkReverseAnimation.gif";
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		
		case NippleTwist: {
			name = "Nipple Twist";
	   		description = "Få dina fiender lida av smärta!";
	   		info = "Vrider motståndarens bröstvårtor. Liten skada.";
	   		type = Type.Fire;
	   		int damage = 9;
	   		energyCost = 10;
			skill = "attack";
	   		attackAnimation="attackAnimations/nippletwistAnimation.gif";
	   		attackReverseAnimation="attackAnimations/nippletwistReverseAnimation.gif";
	   		animationTime=800;
			effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		// FIRE STATSMANIPULERING
		case Eldrustning: {
			name = "Eldrustning";
			description = "Du omfamnas av en eldrustning.";
			info = "Användarens Defense ökar med 5.";
			type = Type.Fire;
			skill = "stats";
			energyCost = 20;
			effects = new Effect(EffectType.AddDefense, Target.Self, 5, type);
	   		attackAnimation="attackAnimations/eldrustningAnimation.gif";
	   		attackReverseAnimation="attackAnimations/eldrustningReverseAnimation.gif";
	   		animationTime=800;
		   		break;
			}
				
		case Rökridå: {
			name = "Rökridå";
	   		description = "Eldhinder sölar ner fienden!";
	   		info = "Försämrar fiendens sikt. Sänker snabbhet med 5.";
	   		type = Type.Fire;
	   		skill = "stats";
	   		energyCost = 40;
			effects = new Effect(EffectType.RemoveSpeed, Target.Other, 5, type);
	   		attackAnimation="attackAnimations/rokridaAnimation.gif";
	   		attackReverseAnimation="attackAnimations/rokridaReverseAnimation.gif";
	   		animationTime=800;
	   		break;
		}
		
		case EldIllussion: {
			name = "Eldillusion";
			description = "Skapar en elddubblett av dig själv!";
			info = "Skapar kopia av dig själv som förvirrar motståndaren. Ökar snabbhet med 5.";
			type = Type.Fire;
			energyCost = 25;
			skill = "stats";
			effects = new Effect(EffectType.AddSpeed, Target.Other, 5, type);
	   		attackAnimation="attackAnimations/eldillussionAnimation.gif";
	   		attackReverseAnimation="attackAnimations/eldillussionReverseAnimation.gif";
	   		animationTime=900;
		   		break;
			}	
		//NATUR DAMAGE
		case Knuffa: {
			name = "Knuffa";
			description = "Knas, du putta han!";
			info ="Knuffar din fiende. Liten skada.";
			type = Type.Nature;
			skill = "attack";
			energyCost = 10;
			int damage = 9;
	   		attackAnimation="attackAnimations/knuffaAnimation.gif";
	   		attackReverseAnimation="attackAnimations/knuffaReverseAnimation.gif";
	   		animationTime=800;
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		
		case HagelStorm: {
			name = "Hagelstorm";
			description = "Stora isbollar regnar överallt.";
			info = "Isbollstorm. Ultimate.";
			type = Type.Nature;
			skill = "attack";
			energyCost = 100;
			int damage =135;
	   		attackAnimation="attackAnimations/hagelStormAnimation.gif";
	   		attackReverseAnimation="attackAnimations/hagelStormReverseAnimation.gif";
	   		animationTime=960;
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		
		case Äggning: {
			name = "Äggning";
			description = "Äggad, förödmjukad och sårad.";
			info = "Kastar ägg på motståndaren. Lagom skada.";
			type = Type.Nature;
			skill = "attack";
			energyCost = 40;
			int damage = 42;
	   		attackAnimation="attackAnimations/aggningAnimation.gif";
	   		attackReverseAnimation="attackAnimations/aggningReverseAnimation.gif";
	   		animationTime=800;
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		//NATUR STATSMANIPULERING
		case Vissla: {
			name = "Vissla.";
	   		description = "Du bedövar din motståndare.";
	   		info = "Förlamar din motståndare. Sänker fiendens defense med 5";
	   		type = Type.Nature;
	   		skill = "stats";
	   		energyCost = 15;
	   		attackAnimation="attackAnimations/visslaAnimation.gif";
	   		attackReverseAnimation="attackAnimations/visslaReverseAnimation.gif";
	   		animationTime=800;
			effects = new Effect(EffectType.RemoveDefense, Target.Other, 5, type);
	   		break;
		}
		case BrorteinFjärt: {
			name = "Brorteinfjärt";
	   		description = "Så tungt och tjockt moln att din motståndare inte kan röra sig lika snabbt.";
	   		info = "Flatulerar på fienden. Sänker snabbhet med 5.";
	   		type = Type.Nature;
	   		skill = "stats";
	   		energyCost = 40;
	   		attackAnimation="attackAnimations/brorteinFjärtAnimation.gif";
	   		attackReverseAnimation="attackAnimations/brorteinFjärtReverseAnimation.gif";
	   		animationTime=720;
			effects = new Effect(EffectType.RemoveSpeed, Target.Other, 5, type);
	   		break;
		}
		case NaturTillstånd: {
			name = "Naturtillstånd";
	   		description = "Drar energi från miljön runtom dig.";
	   		info = "Absorberar naturens krafter från omgivningen. Ökar storlek med 5.";
	   		type = Type.Nature;
	   		skill = "stats";
	   		energyCost = 15;
	   		attackAnimation="attackAnimations/naturtillståndAnimation.gif";
	   		attackReverseAnimation="attackAnimations/naturtillståndReverseAnimation.gif";
	   		animationTime=1200;
			effects = new Effect(EffectType.AddSize, Target.Self, 5, type);
	   		break;
		}
		//ENERGI DAMAGE		
		case Skalla: {
			name = "Skalla";
	   		description = "Langar en knock-out!";
	   		info = "Skallar fienden. Hög skada.";
	   		type = Type.Energy;
			skill = "attack";
	   		int damage = 42;
	   		energyCost = 40;
	   		attackAnimation="attackAnimations/skallaAnimation.gif";
	   		attackReverseAnimation="attackAnimations/skallaReverseAnimation.gif";
	   		animationTime=700;
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		
		case Elkretsanalys: {
			name = "Elkretsanalys";
	   		description = "Håll elkretsanalys fï¿½relï¿½sning fï¿½r motstï¿½ndaren, en ofï¿½rlï¿½tlig attack!";
	   		info = "En obarmhärtig energiattack. Ultimate.";
	   		type = Type.Energy;
			skill = "attack";
	   		int damage = 100;
	   		energyCost = 80;
	   		attackAnimation="attackAnimations/elkretsanalysAnimation.gif";
	   		attackReverseAnimation="attackAnimations/elkretsanalysReverseAnimation.gif";
	   		animationTime=300;
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		
		case TorsIlska: {
			name = "Tors Ilska";
	   		description = "Vem är din gud nu?";
	   		info = "Skickar gudomlig ilska på fienden. Liten skada.";
	   		type = Type.Energy;
			skill = "attack";
	   		int damage = 9;
	   		energyCost = 10;
	   		attackAnimation="attackAnimations/torsIlskaAnimation.gif";
	   		attackReverseAnimation="attackAnimations/torsIlskaReverseAnimation.gif";
	   		animationTime=660;
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		//ENERGY STATSMANIPULERING
		case BiffKrim: {
			name = "Biffkrim";
	   		description = "Ingen kan stoppa dig när du är BiffKrim, ditt försvar ökar!";
	   		info = "Du formar din kropp efter Zyzz. Din storlek ökar med 5.";
	   		type = Type.Energy;
	   		skill = "stats";
	   		energyCost = 15;
	   		attackAnimation="attackAnimations/biffkrimAnimation.gif";
	   		attackReverseAnimation="attackAnimations/biffkrimReverseAnimation.gif";
	   		animationTime=1020;
			effects = new Effect(EffectType.AddSize,  Target.Self, 5,type);
	   		break;
		}
		
		case Förödmjuka: {
			name = "Förödmjuka";
	   		description = "Din mamma är så fet...";
	   		info = "Förudmjukar fienden. Sänker fiendens defense med 5.";
	   		type = Type.Energy;
	   		skill = "stats";
	   		energyCost = 15;
	   		attackAnimation="attackAnimations/förödmjukaAnimation.gif";
	   		attackReverseAnimation="attackAnimations/förödmjukaReverseAnimation.gif";
	   		animationTime=800;
			effects = new Effect(EffectType.RemoveDefense, Target.Other, 5, type);
	   		break;
		}
		
		case Blixtsnabb: {
			name = "Blixtsnabb";
	   		description = "Du är Flash! Ingen kommer ikapp dig nu.";
	   		info = "Din snabbhet ökar med 5.";
	   		type = Type.Energy;
	   		skill = "stats";
	   		energyCost = 25;
	   		attackAnimation="attackAnimations/blixtsnabbAnimation.gif";
	   		attackReverseAnimation="attackAnimations/blixtsnabbReverseAnimation.gif";
	   		animationTime=280;
			effects = new Effect(EffectType.AddSpeed, Target.Self, 5, type);
	   		break;
		}
		//WATER DAMAGE
		case Tsunami: {
			name = "Tsunami";
	   		description = "Sri Lanka, Japan, nu är det din tur!";
	   		info = "Översvämmar fienden. Stor skada.";
	   		type = Type.Water;
			skill = "attack";
	   		int damage = 135;
	   		energyCost = 100;
	   		attackAnimation="attackAnimations/tsunamiAnimation.gif";
	   		attackReverseAnimation="attackAnimations/tsunamiReverseAnimation.gif";
	   		animationTime=910;
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		
		case Spotta: {
			name = "Spotta";
	   		description = "En äcklig spottloska.";
	   		info = "Du saliverar på fienden. Liten skada.";
	   		type = Type.Water;
			skill = "attack";
	   		int damage = 9;
	   		energyCost = 10;
	   		attackAnimation="attackAnimations/spottaAnimation.gif";
	   		attackReverseAnimation="attackAnimations/spottaReverseAnimation.gif";
	   		animationTime=600;
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		
		case VattenKanon: {
			name = "Vattenkanon";
	   		description = "Stor vattenbombadering av fiender!";
	   		info = "Sprutar vatten på fienden. Stor skada."; 
	   		type = Type.Water;
	   		int damage = 55;
			skill = "attack";
	   		energyCost = 50;
	   		attackAnimation="attackAnimations/vattenkanonAnimation.gif";
	   		attackReverseAnimation="attackAnimations/vattenkanonReverseAnimation.gif";
	   		animationTime=910;
						effects = new Effect(EffectType.RemoveHealth, Target.Other, damage, type);
	   		break;
		}
		//WATER STATSMANIPULERING
		case Strömvirvel: {

			name = "Strömvirvel";
	   		description = "Snurrig och illamående,fienden är inte lika säker på fötterna.";
	   		info = "Skapar en strömvirvel runt fienden. Sänker snabbhet med 5.";
	   		type = Type.Water;
	   		skill = "stats";
	   		energyCost = 40;
	   		attackAnimation="attackAnimations/strömvirvelAnimaiton.gif";
	   		attackReverseAnimation="attackAnimations/strömvirvelReverseAnimaiton.gif";
	   		animationTime=750;
			effects = new Effect(EffectType.RemoveSpeed, Target.Other, 5, type);
	   		break;
		}
		
		case Bubbelpool: {
			name = "Bubbelpool";
	   		description = "Skönt dopp i bubbelpoolen ger dig nya krafter!";
	   		info = "Slappnar av. Ökar snabbhet med 5";
	   		type = Type.Water;
	   		skill = "stats";
	   		energyCost = 25;
	   		attackAnimation="attackAnimations/bubbelpoolAnimation.gif";
	   		attackReverseAnimation="attackAnimations/bubbelpoolReverseAnimation.gif";
	   		animationTime=700;
			effects = new Effect(EffectType.AddSpeed, Target.Self, 5, type);
	   		break;
		}

		case VattenIÖgat: {
			name = "Vatten i ögat";
	   		description = "försämrar synen för motståndaren!";
	   		info = "Fienden får vattenplask i ögat. Sänker fiendens defense med 5.";
	   		type = Type.Water;
	   		skill = "stats";
	   		energyCost = 15;
	   		attackAnimation="attackAnimations/vatteniögatAnimation.gif";
	   		attackReverseAnimation="attackAnimations/vatteniögatReverseAnimation.gif";
	   		animationTime=800;
			effects = new Effect(EffectType.RemoveDefense, Target.Other, 5, type);
	   		break;
		}
		default:
			throw new UnsupportedOperationException("That effect is not implemented yet!");
		
		
		}
	}			
}

